package com.yjd.pub.system.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;
import com.yjd.comm.base.dao.impl.BaseDaoImpl;
import com.yjd.comm.system.model.AdminRoleInfoDto;
import com.yjd.comm.system.model.AdminRoleUserModel;
import com.yjd.comm.util.FrameUtil;
import com.yjd.pub.system.dao.IAdminRoleUserDao;

/**
 * <b>description</b>：管理员角色组关系服务访问层 <br>
 * <b>time</b>：2016-11-03 17:41:48 <br>
 * <b>author</b>： carl
 */
@Component("adminRoleUserDao")
public class AdminRoleUserDaoImpl extends BaseDaoImpl implements IAdminRoleUserDao {

	private static final String SQLMAPNAMESPACE = AdminRoleUserModel.class.getName();
	private static final String PKNAME = "id";

	
	
	@SuppressWarnings("unchecked")
	@Override
	public List<AdminRoleInfoDto> getAdminRoleByIdList(Map<String, Object> param)
			throws Exception {
		return this.getSqlMap(false).queryForList(this.getStatement("getAdminRoleByIdList"), param);
	}

	
	
	@Override
	public int delete(Long admin_id) throws Exception {
		return this.getSqlMap(true).delete(this.getStatement("delete"), FrameUtil.newHashMap("admin_id",admin_id));
	}



	@Override
	public String getPrimaryKeyName() {
		return PKNAME;
	}

	@Override
	public String getSqlmapNamespace() {
		return SQLMAPNAMESPACE;
	}
	
}
